package com.micai.springboot.service;

import com.baomidou.mybatisplus.service.IService;
import com.micai.springboot.dto.UserDto;
import com.micai.springboot.dto.UserRoleDto;
import com.micai.springboot.entity.UserRoleEntity;

import java.util.List;

/**
 * @Auther: zhaoxinguo
 * @Date: 2018/7/26 12:49
 * @Description:
 */
public interface UserRoleService extends IService<UserRoleEntity> {

    Integer save(UserRoleDto userRoleDto);

    List<Long> getRoleIdsByUserId(Long id);

    void deleteOrSave(Long userId, List<Long> roleIds);

    void deleteUserRoleByUserId(Long userId);

    Integer getRoleIdsByRoleId(Long roleId);

    List<Long> getUserIdsByRoleId(Long roleId);

    List<UserRoleDto> list();
}
